package cn.gorit.entity.user;

import java.io.Serializable;

/**
 * @version v1.0
 * @Classname User
 * @Description 前台用户实体类
 * PS： 尽可能让注册的流程简易点
 * @Author Gorit
 * @Created by 2021/3/8 23:35
 * @IDLE IntelliJ IDEA
 **/
public class User implements Serializable {

    // 用户 ID, UUID 随机生成的
    private String userId;

    // 用户头像，非空
    private String avatar;

    // 用户真实名称, 允许为空
    private String name;

    // 用户昵称，对外展示，优先展示昵称，如果没有昵称则展示真名
    private String nickname;

    // 登录账户  必填数据
    private String username;

    // 登录密码  必填数据
    private String password;

    // 用户个人介绍
    private String profile;

    // 注册日期
    private String registerDate;

    // 修改日期
    private String updateTime;

    // 用户性别 0 男 1 女  非必填
    private Integer gender;

    // 用户邮箱 非必填
    private String email;

    // 乐观锁
    private Integer version;

    // 逻辑删除，用户可以主动注销账号 0 是正常，1 申请注销，2 注销成功
    private Integer deleted;

    public User() {
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getProfile() {
        return profile;
    }

    public void setProfile(String profile) {
        this.profile = profile;
    }

    public String getRegisterDate() {
        return registerDate;
    }

    public void setRegisterDate(String registerDate) {
        this.registerDate = registerDate;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId='" + userId + '\'' +
                ", avatar='" + avatar + '\'' +
                ", name='" + name + '\'' +
                ", nickname='" + nickname + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", profile='" + profile + '\'' +
                ", registerDate='" + registerDate + '\'' +
                ", updateTime='" + updateTime + '\'' +
                ", gender=" + gender +
                ", email='" + email + '\'' +
                ", version=" + version +
                ", deleted=" + deleted +
                '}';
    }
}
